package com.sws.orderMS.pojo;

public class CreditCard implements PaymentMethod {

	private String name = "Unionpay";
	protected double balance;
	
	public CreditCard(){
	}
	
	public CreditCard(double balance) {
		this.balance = balance;
	}
	
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public double getBalance() {
		return balance;
	}

	public void setBalance(double balance) {
		this.balance = balance;
	}

	@Override
	public void Pay(double total) {
		balance = balance - total;
	}

	@Override
	public int getPaymentMethodId(String key) {
		return paymentMethod.get(key);
	}

}
